Integrand size = 23, antiderivative size = 57 \[ \int (c+d x) \sec ^2(a+b x) \sin (3 a+3 b x) \, dx=\frac {d \text {arctanh}(\sin (a+b x))}{b^2}-\frac {4 (c+d x) \cos (a+b x)}{b}-\frac {(c+d x) \sec (a+b x)}{b}+\frac {4 d \sin (a+b x)}{b^2} \]
Time = 0.81 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.84 \[ \int (c+d x) \sec ^2(a+b x) \sin (3 a+3 b x) \, dx=-\frac {\sec (a+b x) \left (3 b c+3 b d x+2 b (c+d x) \cos (2 (a+b x))+d \cos (a+b x) \left (\log \left (\cos \left (\frac {1}{2} (a+b x)\right )-\sin \left (\frac {1}{2} (a+b x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (a+b x)\right )+\sin \left (\frac {1}{2} (a+b x)\right )\right )\right )-2 d \sin (2 (a+b x))\right )}{b^2} \]
-((Sec[a + b*x]*(3*b*c + 3*b*d*x + 2*b*(c + d*x)*Cos[2*(a + b*x)] + d*Cos[ a + b*x]*(Log[Cos[(a + b*x)/2] - Sin[(a + b*x)/2]] - Log[Cos[(a + b*x)/2] + Sin[(a + b*x)/2]]) - 2*d*Sin[2*(a + b*x)]))/b^2)
Time = 0.27 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {4931, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (c+d x) \sin (3 a+3 b x) \sec ^2(a+b x) \, dx\) |
\(\Big \downarrow \) 4931 |
\(\displaystyle \int \left (3 (c+d x) \sin (a+b x)-(c+d x) \sin (a+b x) \tan ^2(a+b x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {d \text {arctanh}(\sin (a+b x))}{b^2}+\frac {4 d \sin (a+b x)}{b^2}-\frac {4 (c+d x) \cos (a+b x)}{b}-\frac {(c+d x) \sec (a+b x)}{b}\) |
(d*ArcTanh[Sin[a + b*x]])/b^2 - (4*(c + d*x)*Cos[a + b*x])/b - ((c + d*x)* Sec[a + b*x])/b + (4*d*Sin[a + b*x])/b^2
3.4.91.3.1 Defintions of rubi rules used
Int[((e_.) + (f_.)*(x_))^(m_.)*(F_)[(a_.) + (b_.)*(x_)]^(p_.)*(G_)[(c_.) + (d_.)*(x_)]^(q_.), x_Symbol] :> Int[ExpandTrigExpand[(e + f*x)^m*G[c + d*x] ^q, F, c + d*x, p, b/d, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && Member Q[{Sin, Cos}, F] && MemberQ[{Sec, Csc}, G] && IGtQ[p, 0] && IGtQ[q, 0] && E qQ[b*c - a*d, 0] && IGtQ[b/d, 1]
Time = 1.60 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.68
method | result | size |
default | \(-\frac {4 c \cos \left (x b +a \right )}{b}-\frac {c}{b \cos \left (x b +a \right )}+\frac {4 d \left (\sin \left (x b +a \right )-\left (x b +a \right ) \cos \left (x b +a \right )+\cos \left (x b +a \right ) a \right )}{b^{2}}-\frac {d x}{b \cos \left (x b +a \right )}+\frac {d \ln \left (\sec \left (x b +a \right )+\tan \left (x b +a \right )\right )}{b^{2}}\) | \(96\) |
risch | \(-\frac {2 \left (d x b +c b +i d \right ) {\mathrm e}^{i \left (x b +a \right )}}{b^{2}}-\frac {2 \left (d x b +c b -i d \right ) {\mathrm e}^{-i \left (x b +a \right )}}{b^{2}}-\frac {2 \,{\mathrm e}^{i \left (x b +a \right )} \left (d x +c \right )}{b \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )}-\frac {d \ln \left ({\mathrm e}^{i \left (x b +a \right )}-i\right )}{b^{2}}+\frac {d \ln \left (i+{\mathrm e}^{i \left (x b +a \right )}\right )}{b^{2}}\) | \(123\) |
-4*c*cos(b*x+a)/b-c/b/cos(b*x+a)+4*d/b^2*(sin(b*x+a)-(b*x+a)*cos(b*x+a)+co s(b*x+a)*a)-d/b/cos(b*x+a)*x+d/b^2*ln(sec(b*x+a)+tan(b*x+a))
Time = 0.27 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.63 \[ \int (c+d x) \sec ^2(a+b x) \sin (3 a+3 b x) \, dx=-\frac {2 \, b d x + 8 \, {\left (b d x + b c\right )} \cos \left (b x + a\right )^{2} - d \cos \left (b x + a\right ) \log \left (\sin \left (b x + a\right ) + 1\right ) + d \cos \left (b x + a\right ) \log \left (-\sin \left (b x + a\right ) + 1\right ) - 8 \, d \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 2 \, b c}{2 \, b^{2} \cos \left (b x + a\right )} \]
-1/2*(2*b*d*x + 8*(b*d*x + b*c)*cos(b*x + a)^2 - d*cos(b*x + a)*log(sin(b* x + a) + 1) + d*cos(b*x + a)*log(-sin(b*x + a) + 1) - 8*d*cos(b*x + a)*sin (b*x + a) + 2*b*c)/(b^2*cos(b*x + a))
Exception generated. \[ \int (c+d x) \sec ^2(a+b x) \sin (3 a+3 b x) \, dx=\text {Exception raised: HeuristicGCDFailed} \]
Leaf count of result is larger than twice the leaf count of optimal. 3330 vs. \(2 (57) = 114\).
Time = 0.39 (sec) , antiderivative size = 3330, normalized size of antiderivative = 58.42 \[ \int (c+d x) \sec ^2(a+b x) \sin (3 a+3 b x) \, dx=\text {Too large to display} \]
-2*((cos(3*b*x + 3*a) + cos(b*x + a))*cos(4*b*x + 4*a) + (3*cos(2*b*x + 2* a) + 1)*cos(3*b*x + 3*a) + 3*cos(2*b*x + 2*a)*cos(b*x + a) + (sin(3*b*x + 3*a) + sin(b*x + a))*sin(4*b*x + 4*a) + 3*sin(3*b*x + 3*a)*sin(2*b*x + 2*a ) + 3*sin(2*b*x + 2*a)*sin(b*x + a) + cos(b*x + a))*c/(b*cos(3*b*x + 3*a)^ 2 + 2*b*cos(3*b*x + 3*a)*cos(b*x + a) + b*cos(b*x + a)^2 + b*sin(3*b*x + 3 *a)^2 + 2*b*sin(3*b*x + 3*a)*sin(b*x + a) + b*sin(b*x + a)^2) - 1/2*(4*(co s(a)^2 + sin(a)^2)*b*x*cos(b*x + a) + 12*(b*x*cos(2*b*x + 3*a)*cos(b*x + 2 *a) + b*x*cos(b*x + 2*a)*cos(a) + b*x*sin(2*b*x + 3*a)*sin(b*x + 2*a) + b* x*sin(b*x + 2*a)*sin(a))*cos(3*b*x + 3*a)^2 + 4*(b*x*cos(b*x + a) - sin(b* x + a))*cos(2*b*x + 3*a)^2 + 12*(b*x*cos(2*b*x + 3*a)*cos(b*x + 2*a) + b*x *cos(b*x + 2*a)*cos(a) + b*x*sin(2*b*x + 3*a)*sin(b*x + 2*a) + b*x*sin(b*x + 2*a)*sin(a))*sin(3*b*x + 3*a)^2 + 4*(b*x*cos(b*x + a) - sin(b*x + a))*s in(2*b*x + 3*a)^2 + 4*((b*x*cos(2*b*x + 3*a) + b*x*cos(a) + sin(2*b*x + 3* a) + sin(a))*cos(3*b*x + 3*a)^2 + (b*x*cos(a) + sin(a))*cos(b*x + a)^2 + ( b*x*cos(2*b*x + 3*a) + b*x*cos(a) + sin(2*b*x + 3*a) + sin(a))*sin(3*b*x + 3*a)^2 + (b*x*cos(a) + sin(a))*sin(b*x + a)^2 + 2*(b*x*cos(2*b*x + 3*a)*c os(b*x + a) + (b*x*cos(a) + sin(a))*cos(b*x + a) + cos(b*x + a)*sin(2*b*x + 3*a))*cos(3*b*x + 3*a) + (b*x*cos(b*x + a)^2 + b*x*sin(b*x + a)^2)*cos(2 *b*x + 3*a) + 2*(b*x*cos(2*b*x + 3*a)*sin(b*x + a) + (b*x*cos(a) + sin(a)) *sin(b*x + a) + sin(2*b*x + 3*a)*sin(b*x + a))*sin(3*b*x + 3*a) + (cos(...
Leaf count of result is larger than twice the leaf count of optimal. 365 vs. \(2 (57) = 114\).
Time = 0.37 (sec) , antiderivative size = 365, normalized size of antiderivative = 6.40 \[ \int (c+d x) \sec ^2(a+b x) \sin (3 a+3 b x) \, dx=\frac {10 \, b c \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{4} + 10 \, {\left (b x + a\right )} d \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{4} - 10 \, a d \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{4} + d \log \left (\frac {2 \, {\left (\tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{2} + 2 \, \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right ) + 1\right )}}{\tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{4} - d \log \left (\frac {2 \, {\left (\tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{2} - 2 \, \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right ) + 1\right )}}{\tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{4} - 12 \, b c \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{2} - 12 \, {\left (b x + a\right )} d \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{2} + 12 \, a d \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{2} + 16 \, d \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{3} + 10 \, b c + 10 \, {\left (b x + a\right )} d - 10 \, a d - d \log \left (\frac {2 \, {\left (\tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{2} + 2 \, \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right ) + 1\right )}}{\tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{2} + 1}\right ) + d \log \left (\frac {2 \, {\left (\tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{2} - 2 \, \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right ) + 1\right )}}{\tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{2} + 1}\right ) - 16 \, d \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )}{2 \, {\left (b \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{4} - b\right )} b} \]
1/2*(10*b*c*tan(1/2*b*x + 1/2*a)^4 + 10*(b*x + a)*d*tan(1/2*b*x + 1/2*a)^4 - 10*a*d*tan(1/2*b*x + 1/2*a)^4 + d*log(2*(tan(1/2*b*x + 1/2*a)^2 + 2*tan (1/2*b*x + 1/2*a) + 1)/(tan(1/2*b*x + 1/2*a)^2 + 1))*tan(1/2*b*x + 1/2*a)^ 4 - d*log(2*(tan(1/2*b*x + 1/2*a)^2 - 2*tan(1/2*b*x + 1/2*a) + 1)/(tan(1/2 *b*x + 1/2*a)^2 + 1))*tan(1/2*b*x + 1/2*a)^4 - 12*b*c*tan(1/2*b*x + 1/2*a) ^2 - 12*(b*x + a)*d*tan(1/2*b*x + 1/2*a)^2 + 12*a*d*tan(1/2*b*x + 1/2*a)^2 + 16*d*tan(1/2*b*x + 1/2*a)^3 + 10*b*c + 10*(b*x + a)*d - 10*a*d - d*log( 2*(tan(1/2*b*x + 1/2*a)^2 + 2*tan(1/2*b*x + 1/2*a) + 1)/(tan(1/2*b*x + 1/2 *a)^2 + 1)) + d*log(2*(tan(1/2*b*x + 1/2*a)^2 - 2*tan(1/2*b*x + 1/2*a) + 1 )/(tan(1/2*b*x + 1/2*a)^2 + 1)) - 16*d*tan(1/2*b*x + 1/2*a))/((b*tan(1/2*b *x + 1/2*a)^4 - b)*b)
Time = 1.76 (sec) , antiderivative size = 150, normalized size of antiderivative = 2.63 \[ \int (c+d x) \sec ^2(a+b x) \sin (3 a+3 b x) \, dx={\mathrm {e}}^{-a\,1{}\mathrm {i}-b\,x\,1{}\mathrm {i}}\,\left (\frac {-2\,b\,c+d\,2{}\mathrm {i}}{b^2}-\frac {2\,d\,x}{b}\right )-{\mathrm {e}}^{a\,1{}\mathrm {i}+b\,x\,1{}\mathrm {i}}\,\left (\frac {2\,b\,c+d\,2{}\mathrm {i}}{b^2}+\frac {2\,d\,x}{b}\right )-\frac {d\,\ln \left ({\mathrm {e}}^{a\,1{}\mathrm {i}+b\,x\,1{}\mathrm {i}}-\mathrm {i}\right )}{b^2}+\frac {d\,\ln \left ({\mathrm {e}}^{a\,1{}\mathrm {i}+b\,x\,1{}\mathrm {i}}+1{}\mathrm {i}\right )}{b^2}-\frac {{\mathrm {e}}^{a\,1{}\mathrm {i}+b\,x\,1{}\mathrm {i}}\,\left (c+d\,x\right )\,2{}\mathrm {i}}{b\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}\,1{}\mathrm {i}+1{}\mathrm {i}\right )} \]